package com.shuogg.transaction.dao;

import com.shuogg.transaction.model.User;

import java.util.List;

public interface UserDao {
    long add(User user);

    void update(User user);

    void delete(Long id);

    List<User> listAll();

    Long count();

    Long countBy(String field, Object value);

    void deleteBy(String field, Object value);

    User get(Long id);

    void batchDelete(List<Long> idList);

    User getBy(String field, Object value);

    User getByAnd(String field1, Object value1, String field2, Object value2);

    User getByOr(String field1, Object value1, String field2, Object value2);

    List listBy(String field, Object value);

    List<User> listByAnd(String field1, Object value1, String field2, Object value2);

    List<User> listByOr(String field1, Object value1, String field2, Object value2);

}
